<?php
/**
 * (Command) 店铺品牌广告
 */
namespace App\Console\Commands\Operation\Ads;

use App\Logic\Operation\Ads\SbCampaigns as SbCampaignsLogic;
use Illuminate\Console\Command;
class SbCampaigns extends Command
{
    /**
     * @var string
     */
    protected $signature = 'operation:sync-ads-sbc {startDate=null} {endDate=null}';

    /**
     * The console command description.
     * @var string
     */
    protected $description = 'exe func';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     */
    public function handle()
    {
        $startDateParam = $this->argument('startDate');
        $endDateParam = $this->argument('endDate');
        $dateParam = getDateParam($startDateParam, $endDateParam);
        if(!$dateParam['status']) dd($dateParam['message']);

        $res = SbCampaignsLogic::exe($dateParam['date']);
        $this->info('finish!');
        dd($res);

    }
}
